/**
 * File Name	: DataField.cpp
 * Location		: /Data/
 * Lib.Name		: Data.a
 * Designer		: OS (12-09-06)
 */

#include "stdafx.h"
#include "DataField.h"
#include <typeinfo>

namespace Core
{

	DataField::DataField() : m_Set(false)
	{
		m_Name = "Data Field";
		m_NumberOfItems = 0;
	}

	DataField::~DataField()
	{
	}

	void DataField::SynchronizeFrom(DataField& p_DataField)
	{
		if(typeid(*this)==typeid(p_DataField))
		{
			RawData t_RawData;
			p_DataField.WriteRawData(t_RawData);
			ReadRawData(t_RawData);
		}
	}

	void DataField::Set()
	{
		m_Set = true;
	}

	void DataField::Unset()
	{
		m_Set = false;
	}

	bool DataField::Isset()
	{
		return m_Set;
	}

	std::string DataField::GetName()
	{
		return m_Name;
	}

	void DataField::SetName(std::string p_Name)
	{
		m_Name = p_Name;
	}

	unsigned char DataField::GetNumberOfItems()
	{
		return m_NumberOfItems;
	}

	std::string DataField::GetItemByIndex(unsigned char p_Index)
	{
		return "";
	}

	void DataField::SetItemByIndex(unsigned char p_Index, std::string p_String)
	{
	}
}
